unit ImgEdit;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
  Vcl.StdCtrls, Vcl.Imaging.pngimage, Vcl.ExtCtrls, acPNG;

type
  TfImgEdit = class(TFrame)
    image: TImage;
    Image1: TImage;
    Edit1: TEdit;
    procedure imageMouseEnter(Sender: TObject);
    procedure imageMouseLeave(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    constructor Create(AOwner: TComponent); override;
  end;

implementation

uses
  MsgWidget;

{$R *.dfm}

constructor TfImgEdit.Create(AOwner: TComponent);
begin
  inherited;
  image.Picture.LoadFromFile(imageFile('edit'));
end;

procedure TfImgEdit.imageMouseEnter(Sender: TObject);
begin
  image.Picture.LoadFromFile(imageFile('edit2'));
end;

procedure TfImgEdit.imageMouseLeave(Sender: TObject);
begin
  image.Picture.LoadFromFile(imageFile('edit'));
end;

end.

